<?php
$server="localhost";
$name="root";
$pwd="root";
$db="abdulla";

$con=mysqli_connect($server,$name,$pwd,$db);

$name=$_POST['name'];
$age=$_POST['age'];
$ads=$_POST['ads'];


if ($con){
    $sql="insert into aynak(name,age,ads) values('$name','$age','$ads')";

    $run=mysqli_query($con,$sql);
    if($run){
        echo "添加成功";
    }else{
        echo "已连接数据库，但未能添加数据";
    }
}else{
    echo "未连接数据库，错误内容".mysqli_connect_error();
}
